#include "boids.h"
#include "AE.h"
#include <iostream>

vector3df moveForwardRelativeToRotation(ICameraSceneNode* player, float elapsed, float distance)
{
	//player->setRotation(player->getRotation() + vector3df(mouseMoveX*500, mouseMoveY*500, 0.0f));
	//vector3df rot = player->getRotation();
	
	// in your render/run loop
	core::vector3df pmove(0, 0, 0);
	
	pmove.Z += distance;
	
	// move the player
	core::vector3df pos( player->getPosition() );
	
	// rotate the movement vector into parent coordinate system
	player->getRelativeTransformation().rotateVect(pmove);
	
	const core::vector3df velocity(5.0f, 5.0f, 5.0f); // we can move faster forward than sideways
	
	// apply movement over elapsed time at provided velocity
	pos += (pmove * (velocity * elapsed));
	
	// update the final position
	
	
	return pos;
	
	//player->setPosition(pos);
		
	
}